
#ifndef TIME_H
#define TIME_H


#include "cpu/irq.h"


#define IRQ0_TIME 0x20

// define constant var about system time frequencies
#define PIT_OSC_FREQ 1193182 // 定时器时钟
// define inin 8253 about port
#define PIT_COMMAND_MOOE_PORT 0x43
#define PIT_CHANNEL0_DATA_PORT 0x40

// define about 8253 init port values
#define PIT_CHANNEL (0 << 6)
#define PIT_LOAD_LOHI (3 << 4)
#define PIT_MODE3 (3 << 1)

    void
    time_init(void);
void exception_handler_time(void);

// declare handle time exception function
void do_handler_time(exception_frame_t *frame);

#endif
